const state = {
    info: null,
    token: ''
}

const getters = {
    userInfo: (state, getters) => {
        return state.info;
    },

    userToken: (state, getters) => {
        return state.token;
    }
}

const mutations = {
    setUserInfo(state, { info }) {
        state.info = info || {};
    },


    setUserToken(state, { token }) {
        state.token = token || '';
    }
}

export default {
    state,
    getters,
    mutations
}